open BUFF,"combined_GBM_normal_plink_final_filetered.tped" or die "no file combined_GBM_normal_plink_final_filetered.tped\n";
open(WRBUFF,">combined_GBM_normal_plink_final_filetered_het_minhomo_10.tped");
$line = <BUFF>;
#print WRBUFF $line;
while(<BUFF>)
{
	chomp($_);
	@array = split(" ",$_);
	$hom = 0;
	$het = 0;
	$minhom =0;
	if($array[6] ne "-")
	{
		for($i=7;$i<@array;$i++)
		{
			if($array[$i] <0.5)
			{
				$hom++;
			}
			elsif($array[$i] <1.5)
			{
				$het++;
			}
			else
			{
				$minhom++;
			}
		}
		if($hom > $minhom )
		{
			$temp = $het+$minhom;
		}
		else
		{
			$temp = $het+$hom;
		}
		if($temp > 15)
		{
			print WRBUFF $_."\n";
		}
	}
}

